const swaggerJSDoc = require("swagger-jsdoc");

const options = {
    definition: {
        openapi: "3.0.0",
        info: {
            title: "Express API 文档",
            version: "1.0.0",
            description: "REST API 接口说明",
        },
        servers: [{ url: "http://localhost:3000" }],
    },
    apis: ["./routes/*.js"], // 扫描路由文件中的注释
};

const swaggerSpec = swaggerJSDoc(options);
module.exports = swaggerSpec;

